
const pluginInfoDAO = require('../../core/rdsService/pluginInfoDAO');


exports.getPluginByName = function (artifactId, groupId) {
    return new Promise(function (resolve, reject) {
        pluginInfoDAO.getPluginInfoByCondition(null, groupId, artifactId, (plugins) => {
            if (plugins.length == 0) {
                return resolve(null)
            } else {
                return resolve(plugins[0])
            }
        })
    })
}